home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / src / host.h < prev    next >
C/C++ Source or Header  |  1997-07-22  |  5KB  |  134 lines

  1.  
  2. /* $Id: host.h,v 1.4 1997/06/25 22:08:45 pvmsrc Exp $ */
  3.  
  4. /*
  5.  *         PVM version 3.4:  Parallel Virtual Machine System
  6.  *               University of Tennessee, Knoxville TN.
  7.  *           Oak Ridge National Laboratory, Oak Ridge TN.
  8.  *                   Emory University, Atlanta GA.
  9.  *      Authors:  J. J. Dongarra, G. E. Fagg, M. Fischer
  10.  *          G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
  11.  *         P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
  12.  *                   (C) 1997 All Rights Reserved
  13.  *
  14.  *                              NOTICE
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software and
  17.  * its documentation for any purpose and without fee is hereby granted
  18.  * provided that the above copyright notice appear in all copies and
  19.  * that both the copyright notice and this permission notice appear in
  20.  * supporting documentation.
  21.  *
  22.  * Neither the Institutions (Emory University, Oak Ridge National
  23.  * Laboratory, and University of Tennessee) nor the Authors make any
  24.  * representations about the suitability of this software for any
  25.  * purpose.  This software is provided ``as is'' without express or
  26.  * implied warranty.
  27.  *
  28.  * PVM version 3 was funded in part by the U.S. Department of Energy,
  29.  * the National Science Foundation and the State of Tennessee.
  30.  */
  31.  
  32. /*
  33.  *    host.h
  34.  *
  35.  *    Host table data structures.
  36.  *
  37. $Log: host.h,v $
  38.  * Revision 1.4  1997/06/25  22:08:45  pvmsrc
  39.  * Markus adds his frigging name to the author list of
  40.  *     every file he ever looked at...
  41.  *
  42.  * Revision 1.3  1997/04/30  21:25:57  pvmsrc
  43.  * SGI Compiler Warning Cleanup.
  44.  *
  45.  * Revision 1.2  1997/01/28  19:27:56  pvmsrc
  46.  * New Copyright Notice & Authors.
  47.  *
  48.  * Revision 1.1  1996/09/23  23:43:17  pvmsrc
  49.  * Initial revision
  50.  *
  51.  * Revision 1.4  1995/05/17  16:10:01  manchek
  52.  * added HF_OVERLOAD
  53.  *
  54.  * Revision 1.3  1994/06/21  18:30:47  manchek
  55.  * added HF_SPEED flag
  56.  *
  57.  * Revision 1.2  1994/06/03  20:38:14  manchek
  58.  * version 3.3.0
  59.  *
  60.  * Revision 1.1  1993/08/30  23:26:48  manchek
  61.  * Initial revision
  62.  *
  63.  */
  64.  
  65.  
  66. /* Host descriptor */
  67.  
  68. struct hostd {
  69.     int hd_ref;                    /* num refs to this struct */
  70.     int hd_hostpart;            /* host tid base */
  71.     char *hd_name;                /* name */
  72.     char *hd_arch;                /* cpu arch class */
  73.     char *hd_login;                /* loginname  [used master only] */
  74.     char *hd_dpath;                /* daemon executable */
  75.     char *hd_epath;                /* task exec search path */
  76.     char *hd_bpath;                /* debugger executable */
  77.     char *hd_wdir;                /* pvmd working dir */
  78.     char *hd_sopts;                /* hoster options */
  79.     int hd_flag;
  80.     int hd_dsig;                /* data signature */
  81.     int hd_err;                    /* error code */
  82.     int hd_mtu;                    /* max snd/rcv length */
  83.     struct sockaddr_in hd_sad;    /* UDP address/port */
  84.     int hd_rxseq;                /* expected next seq num from host */
  85.     int hd_txseq;                /* next tx seq num to host */
  86.     struct pkt *hd_txq;            /* not-yet-sent packet queue to host */
  87.     struct pkt *hd_opq;            /* outstanding packets to host */
  88.     int hd_nop;                    /* length of opq */
  89.     struct pkt *hd_rxq;            /* packet reordering queue from host */
  90.     struct pmsg *hd_rxm;        /* to-us msg reassembly from host */
  91.     struct timeval hd_rtt;        /* estd round-trip time to host */
  92.     int hd_speed;                /* cpu relative speed */
  93.     struct mca *hd_mcas;        /* from-host mca cache */
  94.     char *hd_aname;                /* name to use for network address */
  95. };
  96.  
  97. /* hd_flag values */
  98.  
  99. /* for advisory host table */
  100. #define    HF_NOSTART    0x100        /* don't start pvmd */
  101. #define    HF_SPEED    0x200        /* hd_speed is set */
  102. #define    HF_OVERLOAD    0x400        /* allow overloaded (>1 pvmd) host */
  103.  
  104.  
  105. /* Host table */
  106.  
  107. struct htab {
  108.     int ht_serial;                /* serial number */
  109.     int ht_last;                /* highest entry */
  110.     int ht_cnt;                    /* number of entries (not incl [0]) */
  111.     int ht_master;                /* master host */
  112.     int ht_cons;                /* console host */
  113.     int ht_local;                /* this host */
  114.     int ht_narch;                /* count of different data reps */
  115.     struct hostd **ht_hosts;    /* hosts */
  116. };
  117.  
  118. struct hostd *hd_new __ProtoGlarp__(( int ));
  119. void hd_free __ProtoGlarp__(( struct hostd * ));
  120. void hd_unref __ProtoGlarp__(( struct hostd * ));
  121. void hd_dump __ProtoGlarp__(( struct hostd * ));
  122.  
  123. struct hostd *nametohost __ProtoGlarp__(( struct htab *, char * ));
  124. struct hostd *indtohost __ProtoGlarp__(( struct htab *, int ));
  125. struct hostd *tidtohost __ProtoGlarp__(( struct htab *, int ));
  126. struct htab *ht_new __ProtoGlarp__(( int ));
  127. void ht_insert __ProtoGlarp__(( struct htab *, struct hostd * ));
  128. void ht_delete __ProtoGlarp__(( struct htab *, struct hostd * ));
  129. void ht_free __ProtoGlarp__(( struct htab * ));
  130. struct htab *readhostfile __ProtoGlarp__(( char * ));
  131. int ht_merge __ProtoGlarp__(( struct htab *, struct htab * ));
  132. void ht_dump __ProtoGlarp__(( struct htab * ));
  133.  
  134.